package cn.hotel.controller.common;

import cn.hotel.response.Result;
import cn.hotel.response.ResponseTool;
import cn.hotel.service.HotelService;
import cn.hotel.service.RoomTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/hotel")
public class HotelController {
    @Resource
    private HotelService hotelService;

    /**
     *获取酒店的信息，如酒店名，地址，联系电话等
     * @return
     */
    @RequestMapping(value = "")
    public Result getAllHotel(){
        return ResponseTool.success(hotelService.selectAll());
    }
}
